The images rendered by display devices in graphics display systems consist of a matrix of closely spaced dots (“pixels”). Numeric values (also referred to as pixels) define the color and brightness of each of the pixels. Each of the pixels in the display device must be refreshed with its numeric data value many times per second, e.g., 60 Hz. Refresh cycles are necessary because the light emitted from the pixels typically decays with time and because the image being rendered generally changes with time, which requires that the pixels be provided with new values. Generally, the pixels are refreshed in a raster scan pattern, that is, the display screen is scanned from side-to-side in rows from top-to-bottom. A matrix of pixels for refreshing the display screen is referred to as a “frame.” Generally, the matrix is raster-ordered.
More than one “window” may be simultaneously rendered on a display screen. The largest window, which may fill the entire display area, is generally referred to as a “main-window.” A window that is smaller than the entire display screen, and which overlays the “main-window” is referred to as a “sub-window.” A “sprite” is a small number of pixels that define, for example, a screen cursor. The sprite also overlays the main-window.
A camera generates frames. Camera frames may be rendered in the main-window or in a sub-window. Often, camera frames do not have the same dimensions as either the main- or sub-window. Accordingly, before refreshing the display screen with a camera frame, it is often necessary to crop or scale the camera frame
The pixel data for a frame is typically stored in a memory. Generally, the image is stored in raster order. When the screen is refreshed, the frame is fetched from the memory and transmitted to the display device. This memory is known as a refresh, display, or frame buffer. The frame buffer may be a dedicated memory or a dedicated portion of a memory.
The image data for defining an image is stored in the frame buffer by an image data source or input, such as a CPU, digital signal processor (“DSP”), or a digital camera. The data source may store a single frame for the display of a static image, such as photograph, or it may repeatedly store frames in a sequence for rendering video.
“Image tearing” is an artifact that may appear on the display screen, particularly when rendering video. In a refresh cycle, the entire display frame (which includes main-and sub-windows) is fetched from the frame buffer in raster order and transmitted to the display device. It is generally assumed that the image data stored in the frame buffer is static during the refresh cycle. That is, in a refresh cycle pixels are transferred to the display panel as if it were a single frame. Image tearing occurs when the pixels transmitted to the display panel are not all from the same frame.
If the data source is writing pixels to the frame buffer at the same time that pixels are being fetched from the frame buffer, image tearing can occur. There are at least three cases: First, image tearing may be caused because the writing of a new frame catches up with and overtakes the fetching of the current frame. Second, image tearing may occur because the fetching of a current frame catches up with and overtakes the writing of a new frame. Third, image tearing may occur if the frame is rotated for display. For example, suppose that the frame is stored with a 90 degree rotation. As raster-order pixels are received from the input, the pixels of a given row if the image will be written to all of the rows of the frame buffer. The fetching of the rotated frame for display is in raster order. If at the same time that the frame is being written vertically, it is also being fetched for display horizontally, image tearing will occur. (The same result will occur if the image is stored in raster order, but fetched vertically for rotation of the displayed image.) In these cases, the image data presented to the display device during the refresh cycle comes from two distinct frames, rather than a single frame.
One technique known in the art for preventing image tearing is “double-buffering.” In a double-buffer system, the input device writes a frame to a buffer 1 while the output device reads a frame from a buffer 2. Similarly, while the output device reads from the buffer 1, the input device writes to the buffer 2.
Portable, battery-powered devices, such as mobile telephones, personal digital assistants, and digital music devices are increasingly being provided with two or more display panels. These graphics display systems are capable of rendering the same video image simultaneously on each of the display panels. That is, image data from a single image data input may be streamed to the all of the panels for simultaneous display. Thus, image tearing is possible on one or more of the panels.
The known double-buffering technique for preventing image tearing, however, is only adapted for a single output device. Known techniques do not provide for efficiently preventing image tearing where a single video input is streamed to two or more independent display devices for simultaneous display. Duplicating the known double-buffering technique for more than one independent output device would dictate a pair of buffers for each output device. However, this would increase the size of memory required and, accordingly, the cost and power requirements of the graphics display system. Moreover, the use of a pair of buffers for each output device would necessitate writing each input frame to memory two (or more) times, increasing memory bandwidth requirements and power consumption.
Accordingly, methods and apparatus for preventing image tearing where a single video input is streamed to two or more independent display devices for simultaneous display is desirable.